﻿namespace KinonekoSoftware.CodariaDB.Core
{
    public sealed class RemoteSystem : Engine
    {

        protected override void OnDatabaseOpening(RepositoryOpenContext context)
        {
            RemoteDB = context.Repository.Get<SynchronizeRecordInformation>(CollectionNames.RemoteDB);
        }

        protected override void OnDatabaseClosing(ILogger logger)
        {
            RemoteDB = null;
        }

        public ILiteCollection<SynchronizeRecordInformation> RemoteDB { get; private set; }


        public override string EngineID => EngineNames.Sync;
    }
}